<?php
namespace Tbf\Crypto\Password\Hash;
use Tbf\Util\CryptoRandUtil;
use Tbf\Crypto\Password\HashInterface;
/**
 * @deprecated
 */
class BcryptHash implements HashInterface{
	function hash($plain){
		$salt = bin2hex(CryptoRandUtil::binary(12));
		//$b = microtime(true);
		$hashed = crypt($plain,'$2a$10$'.$salt.'$');
		//echo (microtime(true)-$b)."\n";
		return $hashed;
	}
}